98e5ae181ce4c0e72c895bd6b995f4bbec06798d,maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java,AntBuildWriter,writeCompileTarget,#XMLWriter#List#,541
Before Change
private void writeCompileTarget( XMLWriter writer, List compileSourceRoots )
{
AntBuildWriterUtil.writeCommentText( writer, "Compilation target", 1 );
writer.startElement( "target" );
writer.addAttribute( "name", "compile" );
writer.addAttribute( "depends", "get-deps" );
writer.addAttribute( "description", "Compile the code" );
writeCompileTasks( writer, project.getBasedir(), "${maven.build.outputDir}", compileSourceRoots, project
.getBuild().getResources(), null, false );
writer.endElement(); // target
AntBuildWriterUtil.writeLineBreak( writer );
}
private void writeCompileTestsTarget( XMLWriter writer, List testCompileSourceRoots )
After Change
*/
private void writeCompileTarget( XMLWriter writer, List compileSourceRoots )
{
AntBuildWriterUtil.writeCommentText( writer, "Compilation target", 1 );
if ( isPomPackaging( project ) )
{
writer.startElement( "target" );
writer.addAttribute( "name", "compile" );
writer.addAttribute( "description", "Compile the code" );
if ( project.getModules() != null )
{
for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
{
String moduleSubPath = (String) it.next();
writer.startElement( "ant" );
writer.addAttribute( "antfile", "build.xml" );
writer.addAttribute( "dir", PathUtils.toRelative( project.getBasedir(), moduleSubPath ) );
writer.addAttribute( "target", "compile" );
writer.endElement(); // ant
}
}
writer.endElement(); // target
}
else
{
writer.startElement( "target" );
writer.addAttribute( "name", "compile" );
writer.addAttribute( "depends", "get-deps" );
writer.addAttribute( "description", "Compile the code" );
writeCompileTasks( writer, project.getBasedir(), "${maven.build.outputDir}", compileSourceRoots, project
.getBuild().getResources(), null, false );
writer.endElement(); // target
}
AntBuildWriterUtil.writeLineBreak( writer );
}
/**